package box.tuson.com.tusonbox;

import android.os.*;
import android.support.v7.app.*;
import android.text.*;
import android.view.*;
import android.view.View.*;
import android.widget.*;

public class qqcheg extends AppCompatActivity
{
	private Button bn;
	private EditText e,e1,e2;
    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
		requestWindowFeature(getWindow().FEATURE_NO_TITLE);
        setContentView(R.layout.qqcheg);
		bn=(Button) findViewById(R.id.qqButton1);
		e=(EditText) findViewById(R.id.qqEditText1);
		e1=(EditText) findViewById(R.id.qqEditText2);
		e2=(EditText) findViewById(R.id.qqEditText3);
		bn.setOnClickListener(new OnClickListener(){

				@Override
				public void onClick(View p1)
				{
					String m=e.getText().toString();
					String m1=getRe(e1.getText().toString());

					String m2= m+(char)8238+m1+(char)8237;
					e2.setText(m2);
					ClipboardManager manager = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
					manager.setText(m2);
					System.out.println(m2);
					Toast.makeText(qqcheg.this,"已复制到剪切板",1).show();

				}
			});

	}


	public static String getRe(String s){
		StringBuffer sb=new StringBuffer();
		for(int i=s.length()-1;i>=0;i--){
			sb.append(s.charAt(i));
		}
		return sb.toString();
	}


}

